<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0,viewport-fit=cover">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">

    <link rel="stylesheet" href="../../css/weui.min.css">
    <link rel="stylesheet" href="../../css/weuix.css"/>
    <link rel="stylesheet" href="../../layui/css/layui.css"/>
    <script src="../../js/jquery.min.js"></script>
    <script src="../../js/vue.js"></script>
    <script src="../../js/axios.min.js"></script>
    <script src="../../layui/layui.all.js"></script>


    <script src="../../js/f2.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js"></script>
    <script src="https://unpkg.com/vue-chartjs/dist/vue-chartjs.min.js"></script>

    <script src="../../js/app.js"></script>
    <script>
        var uid = getUrlParam('uid');
    </script>
    <style>
        .weui-flex_box {
            margin-top: 20px;
        }

        h3 {
            color: #ff851b;
            font-size: 1.5em;
        }

        .placeholder {
            margin: 5px;
            padding: 0 10px;
            background-color: #ebebeb;
            height: 4.3em;
            line-height: 4.3em;
            text-align: center;
            color: #ff851b;
            font-size: 1.5em;
        }

        .placeholder2 {
            margin: 5px;
            padding: 10px 10px;
            background-color: #ebebeb;
            text-align: center;
            font-size: 14px;
        }

        .placeholder3 {
            margin: 5px;
            padding: 10px 10px;
            background-color: #ebebeb;
            text-align: center;
            font-size: 14px;
        }

        .weui-form-preview {
            font-size: 15px;
        }
        .layui-row{
            height: 50px;
            line-height: 50px;
            border-top: 1px solid #000;
            border-left: 1px solid #000;
            border-right: 1px solid #000;
        }
        .layui-row h4{
            font-weight: 600;
        }
        button{
            margin: 0 auto;
            display: block;
            width: 100px;
            line-height: 30px;
            background: #009688;
            margin-top: 20px;
            color: #fff;
        }
        .page-hd-title{
            text-align: center;
        }
    </style>
</head>
<body>
<div ontouchstart id="app">
    <div class="weui-flex">
        <div class="weui-flex__item">
            <div class="placeholder">{{contacts}}-布尔</div>
        </div>
    </div>
    <div class="weui-tab" id="t3" style="height:44px;">
        <div class="weui-navbar">
            <div class="weui-navbar__item"
                 onclick="location.href='report.html?uid=' + uid + '&oid=' + oid + '&mobile=' + mobile + '&moxie=' + moxie + '&order_no=' + order_no + '&id_no=' + id_no + '&merchant=' + merchant">
                综合报告
            </div>
            <div class="weui-navbar__item  tab-blue"
                 onclick="location.href='report_buer.html?uid=' + uid + '&oid=' + oid + '&mobile=' + mobile + '&moxie=' + moxie + '&order_no=' + order_no + '&id_no=' + id_no + '&merchant=' + merchant">
                多头报告
            </div>
            <div class="weui-navbar__item"
                 onclick="location.href='report_faude.html?uid=' + uid + '&oid=' + oid + '&mobile=' + mobile + '&moxie=' + moxie + '&order_no=' + order_no + '&id_no=' + id_no + '&merchant=' + merchant">
                反欺诈报告
            </div>
            <div class="weui-navbar__item"
                 onclick="location.href='report_carrier.html?uid=' + uid + '&oid=' + oid + '&mobile=' + mobile + '&moxie=' + moxie + '&order_no=' + order_no + '&id_no=' + id_no + '&merchant=' + merchant">
                运营商报告
            </div>
            <div class="weui-navbar__item"
                 onclick="location.href='report_contacts.html?uid=' + uid + '&oid=' + oid + '&mobile=' + mobile + '&moxie=' + moxie + '&order_no=' + order_no + '&id_no=' + id_no + '&merchant=' + merchant">
                手机通讯录
            </div>
            <div class="weui-navbar__item"
                 onclick="location.href='report_messages.html?uid=' + uid + '&oid=' + oid + '&mobile=' + mobile + '&moxie=' + moxie + '&order_no=' + order_no + '&id_no=' + id_no + '&merchant=' + merchant">
                手机短信
            </div>
            <div class="weui-navbar__item"
                 onclick="location.href='report_calllog.html?uid=' + uid + '&oid=' + oid + '&mobile=' + mobile + '&moxie=' + moxie + '&order_no=' + order_no + '&id_no=' + id_no + '&merchant=' + merchant">
                通话记录
            </div>
        </div>
    </div>
    <div><button v-on:click="getDuotouReport()">获取多头数据</button></div>
    <div class="weui-flex weui-flex_box" v-if="reportbool">
        <div class="weui-flex__item">
            <div class="placeholder3">
                <h3 class="page-hd-title">
                    布尔
                </h3>
                <div class="layui-container">
                    <div class="layui-row no_border_right">
                        <div class="layui-col-xs12 layui-col-sm12 layui-col-md12 no_border_left no_border_right">
                            <h3>
                                1 特殊关注名单
                            </h3>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
                            <div><h4>特殊关注名单 ：<span>{{guanzhu.data.result_code_desc}}</span></h4></div>
                        </div>
                    </div>

                    <div v-if="hasdoutou">

                        <div class="layui-row no_border_right">
                            <div class="layui-col-xs12 layui-col-sm12 layui-col-md12 no_border_left no_border_right">
                                <h3>
                                    2 多头借贷
                                </h3>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
                                <div><h4>历史查询调用平台数量 ：<span>{{duotou.data.apply_mechanism_number}}</span></h4></div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近7天查询调用次数 ：<span>{{duotou.data.d7_apply_times}}</span></div>
                            </div>
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近1个月查询调用次数 ：<span>{{duotou.data.m1_apply_times}}</span></div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近3个月查询调用次数 ：<span>{{duotou.data.m3_apply_times}}</span></div>
                            </div>
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近6个月查询调用次数 ：<span>{{duotou.data.m6_apply_times}}</span></div>
                            </div>
                        </div>
                        <!--                            消费金融类机构数-->
                        <div class="layui-row">
                            <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
                                <div><h4>消费金融类机构数 ：<span>{{duotou.data.cflenders}}</span></h4></div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近7天负债机构数 ：<span>{{duotou.data.d7_lend_number}}</span></div>
                            </div>
                        </div>
                        <!--                            负债机构总数-->
                        <div class="layui-row">
                            <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
                                <div><h4>负债机构总数 ：<span>{{duotou.data.liabilities_mechanism_number}}</span></h4></div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>首次负债距今时长 ：<span>{{duotou.data.loanday}}</span></div>
                            </div>
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近1个月负债机构数 ：<span>{{duotou.data.m1_lend_number}}</span></div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近3个月负债机构数 ：<span>{{duotou.data.m3_lend_number}}</span></div>
                            </div>
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近6个月负债机构数 ：<span>{{duotou.data.m6_lend_number}}</span></div>
                            </div>
                        </div>
                        <!--                            网络贷款类机构数-->
                        <div class="layui-row">
                            <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
                                <div><h4>网络贷款类机构数 ：<span>{{duotou.data.nllenders}}</span></h4></div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>已结清负债机构数 ：<span>{{duotou.data.settlement_number}}</span></div>
                            </div>
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近7天还款失败次数 ：<span>{{duotou.data.d7_repay_fail_cnt}}</span></div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近7天还款失败金额 ：<span>{{duotou.data.d7_repay_fail_money}}</span></div>
                            </div>
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近7天成功还款次数 ：<span>{{duotou.data.d7_repay_succ_cnt}}</span></div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近7天成功还款金额 ：<span>{{duotou.data.d7_repay_succ_money}}</span></div>
                            </div>
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>最近一次成功还款距今天数 ：<span>{{duotou.data.last_repay_day}}</span></div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近1个月还款失败次数 ：<span>{{duotou.data.m1_repay_fail_cnt}}</span></div>
                            </div>
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近1个月还款失败金额 ：<span>{{duotou.data.m1_repay_fail_money}}</span></div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近1个月成功还款次数 ：<span>{{duotou.data.m1_repay_succ_cnt}}</span></div>
                            </div>
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近1个月成功还款金额 ：<span>{{duotou.data.m1_repay_succ_money}}</span></div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近3个月还款失败次数 ：<span>{{duotou.data.m3_repay_fail_cnt}}</span></div>
                            </div>
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近3个月还款失败金额 ：<span>{{duotou.data.m3_repay_fail_money}}</span></div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近3个月成功还款次数 ：<span>{{duotou.data.m3_repay_succ_cnt}}</span></div>
                            </div>
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近3个月成功还款金额 ：<span>{{duotou.data.m3_repay_succ_money}}</span></div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近6个月还款失败次数 ：<span>{{duotou.data.m6_repay_fail_cnt}}</span></div>
                            </div>
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近6个月还款失败金额 ：<span>{{duotou.data.m6_repay_fail_money}}</span></div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近6个月成功还款次数 ：<span>{{duotou.data.m6_repay_succ_cnt}}</span></div>
                            </div>
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>近6个月成功还款金额 ：<span>{{duotou.data.m6_repay_succ_money}}</span></div>
                            </div>
                        </div>
                        <!--                            逾期机构-->
                        <div class="layui-row">
                            <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
                                <div><h4>逾期机构数 ：<span>{{duotou.data.counts}}</span></h4></div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>是否逾期 ：<span>{{duotou.data.is_overdue}}</span></div>
                            </div>
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>逾期金额 ：<span>{{duotou.data.overdue_money}}</span></div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                                <div>是否存在逾期未结清 ：<span>{{duotou.data.settlement}}</span></div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    var uid = getUrlParam('uid');
    var oid = getUrlParam('oid');
    var mobile = getUrlParam('mobile');
    var id_no = getUrlParam('id_no');
    var order_no = getUrlParam('order_no');
    var moxie = getUrlParam('moxie');
    var merchant = getUrlParam('merchant');
    var app = new Vue({
        el: '#app',
        data: {
            contacts: '',
            messages: '',
            reportbool: false,
            user: {},
            duotou: {},
            guanzhu: {},
            hasdoutou: false,
            haslist: false
        },
        mounted: function () {
            // this.contactsDataRreport();
            this.userinfo();
        },
        methods: {
            userinfo: function () {
                var vm = this;
                axios.post('/api/user/report/userinfo', {
                    uid: uid,
                    merchant: merchant
                }).then(function (response) {
                    var obj = response.data;
                    if (obj.code == 0) {
                        vm.contacts = obj.data.verify_name;
                    } else {

                    }
                }).catch(function (response) {
                    console.log(response);
                });
            },
            getDuotouReport: function(){
                this.reportbool = true;
                this.contactsDataRreport();
            },
            contactsDataRreport: function () {
                var vm = this;
                layui.use('layer', function () {
                    var layer = layui.layer;
                    var index = layer.load(); //换了种风格
                    axios.post('/api/report/page/buer', {
                        uid: uid,
                        oid: oid,
                        merchant: merchant
                    }).then(function (response) {
                        var obj = response.data;
                        if (obj.code == 0) {
                            // vm.contacts = obj.data.userinfo;
                            vm.duotou = obj.data.duotou;
                            vm.guanzhu = obj.data.list;
                            vm.reportbool = true;
                            vm.haslist = obj.data.list.show;
                            vm.hasdoutou = obj.data.duotou.show;
                            layer.close(index);
                        }else if(obj.code == 1){
                            layer.msg(obj.text);
                            layer.close(index);
                        } else {
                            layer.msg('暂无数据');
                            layer.close(index);
                        }
                    }).catch(function (response) {
                        console.log(response);
                    });
                })
            }
        }
    });
</script>
</body>
</html>
